package examples;

public class SeasonDemo {
    public static void main(String[] args) {
        printSeason1(1);
        printSeason1(SeasonInterface.SPRING);
        printSeason1(-1);
        printSeason2(SeasonEnum. AUTUMN);
    }
    public static void printSeason1(int season){
        switch(season){
            case 1:
                System.out.println("这就是春季");
                break;
            case 2:
                System.out.println("这就是夏季");
                break;
            case 3:
                System.out.println("这就是秋季");
                break;
            case 4:
                System.out.println("这就是冬季");
                break;
            default:
                System.out.println("输入有误");
        }
    }
    public static void printSeason2(SeasonEnum season){
        switch(season){
            case SPRING:
                System.out.println("这就是春季");
                break;
            case SUMMER:
                System.out.println("这就是夏季");
                break;
            case AUTUMN:
                System.out.println("这就是秋季");
                break;
            case WINTER:
                System.out.println("这就是冬季");
                break;

        }
    }
}
